home *** CD-ROM | disk | FTP | other *** search
- Path: news.bellglobal.com!news
- From: dlowe@pathcom.com (David Lowe)
- Newsgroups: comp.lang.c
- Subject: A Simple Question From A Beginner (Please Help)
- Date: Mon, 11 Mar 1996 21:38:11 GMT
- Organization: Mettis Software Solutions Inc.
- Message-ID: <4i26gm$6th@news.bellglobal.com>
- NNTP-Posting-Host: 199.243.250.173
- X-Newsreader: Forte Free Agent 1.0.82
-
-
- This should be a simple thing to execute but for some reason I can not
- get it to work.
-
-
- What I would like to do is execute something like a SHELL command.
- What I would like to do in C or C++ is the equivelent to typing the
- following at the Win NT command line:
-
-
- sendmail dlowe@pathcom.com < mail.txt
-
- I have tried the following code:
-
- _spawnl( _P_WAIT, "sendmail.exe", "dlowe@pathcom.com < mail.txt",
- NULL);
-
- and
-
-
- args[0] = "child";
- args[1] = "dlowe@pathcom.com < c:\\notes\\data\\clustrep.txt";
- args[2] = NULL;
- args[3] = NULL;
- .
- .
- .
- _spawnvp( _P_OVERLAY, "c:\\Sendmail\\Sendmail.exe", args );
-
-
- My problem ranges from nothing happends to Sendmail not see the
- parameters properly.
-
- Any help would be greatly appreaciated.
-
- Thanks,
-
- David
-
-